补充ObjectId类型的GenerateNewId、Parse、TryParse常用方法。#2594
补充ObjectId类型的GenerateNewId、Parse、TryParse常用方法。#2594silmoonsone wants to merge 1 commit intolitedb-org:masterfrom
Conversation
|
Is the LiteDB project currently unmaintained? |
| { | ||
| if (bytes == null) throw new ArgumentNullException(nameof(bytes)); | ||
|
|
||
| this.Timestamp = |
There was a problem hiding this comment.
Please avoid unnecessary changes
There was a problem hiding this comment.
This is the formatting behavior of the Visual Studio C# code editor, not a change I made.
There was a problem hiding this comment.
Hey @silmoonsone,
You made the commit - Git doesn’t distinguish whether a change was “intentional” or triggered by your editor. Whatever is staged ends up in your commit. That’s why it’s important to review staged changes before committing.
Some references:
-
“The
git commitcommand captures a snapshot of the project’s currently staged changes.” -
Microsoft Docs – Git in Visual Studio
“Only changes in the Staged Changes section are added to the next commit … changes can also be unstaged by using
git reset <file_path>.” -
Noble Desktop – Stage and Commit Files
“Staging in Git involves adding new, modified, or deleted files to a staging area before committing them.”
-
Official Git Docs – git commit
“Create a new commit containing the current contents of the index … prior use of the
git addcommand is required to select the changes that will be staged.”
TL;DR: Even if Visual Studio auto-formats code, those edits only end up in the repo because they were staged and committed. It’s your responsibility to check what’s staged (e.g. with git diff --cached) before making the commit.
|
Please add unit tests |
补充ObjectId类型的GenerateNewId、Parse、TryParse常用方法。